package com.dalin.platform.loa.action;

import java.util.List;

import com.dalin.framework.action.StrutsTwoAction;
import com.dalin.platform.loa.service.WsSecurityService;

/*****************************************************************************
 * @content: 权限列头                                                                                                                               *
 * @author : 那建林                                                                                                                                 *
 * @modDate: 2011-02-23 14:18:18                                            *
 * @modDate: 2011-02-23 14:18:18                                            *
 ****************************************************************************/
public class LoaGridHeaderManagerAction extends StrutsTwoAction {
	private Long operateId;
	private WsSecurityService wsSecurityService;
	
	public String execute() throws Exception {
		super.printInfo("", "===== this action begin");
		try {
			List dataList = wsSecurityService.queryLoaHeaders(
    				getCurrentUser().getLum(), operateId);
    		if (dataList.size() == 0) {
    			setResContent(false, "您无权访问任何列头");
    		} else {
    			setResContent("{success:true,dataList:"+dataList.toString()+"}");
    		}
		} catch (Exception e) {
			e.printStackTrace();
		}
		super.printInfo("", "===== this action end");
		return null;
	}

	public Long getOperateId() {
		return operateId;
	}

	public void setOperateId(Long operateId) {
		this.operateId = operateId;
	}

	public WsSecurityService getWsSecurityService() {
		return wsSecurityService;
	}

	public void setWsSecurityService(WsSecurityService wsSecurityService) {
		this.wsSecurityService = wsSecurityService;
	}
}
